import {RouteRecordRaw} from 'vue-router'
// import { h } from 'vue'
const constantRouterComponents={
  // 测试用例
  Test:()=>import('@/views/test/table.vue'),
  Login:()=>import('@/views/login/index.vue'),
  BasicLayout:()=>import('@/layout/basicLayout.vue'),
  AdmissionApplicaitonManagement:()=>import('@/views/channelMerchantManagement/admissionApplicaitonManagement/index.vue'),
  AdmissionApplicaitonManagementDetail:()=>import('@/views/channelMerchantManagement/admissionApplicaitonManagement/detail.vue')
}
// 静态路由
export const constantRoutes:RouteRecordRaw[]=[
  {
    path:'/login',
    name: 'login',
    component:constantRouterComponents.Login,
    meta: { title: '登录' },
  },
  {
    path: '/',
    name: 'basicLayout',
    component: constantRouterComponents.BasicLayout,
    meta: { title: '首页' },
    children: [
      {
        path: '/test',
        name: 'test',
        meta: {
          title: '组件测试',
          breadList: [
            { title: '渠道商户管理', path: '/channelMerchantManagement' },
            { title: '入驻申请管理', path: '/channelMerchantManagement/admissionApplicaitonManagement' },
          ],
        },
        component: constantRouterComponents.Test,
      },
      {
        path: '/channelMerchantManagement/admissionApplicaitonManagement',
        name: 'admissionApplicaitonManagement',
        meta: {
          title: '入驻申请管理',
          breadList: [
            { title: '渠道商户管理', path: '/channelMerchantManagement' },
            { title: '入驻申请管理', path: '/channelMerchantManagement/admissionApplicaitonManagement' },
          ],
        },
        component: constantRouterComponents.AdmissionApplicaitonManagement,
      },

      {
        path: '/channelMerchantManagement/admissionApplicaitonManagement/detail',
        name: 'admissionApplicaitonManagementDetail',
        meta: {
          title: '查看详情',
          breadList: [
            { title: '渠道商户管理', path: '/channelMerchantManagement' },
            { title: '入驻申请管理', path: '/channelMerchantManagement/admissionApplicaitonManagement' },
            { title: '查看详情', path: '/channelMerchantManagement/admissionApplicaitonManagement/detail' },
          ],
        },
        component: constantRouterComponents.AdmissionApplicaitonManagementDetail,
      },
    ],
  },
  // {
  //   path:'/redirect',
  //   component:Layout,
  //   meta:{hidden:true},
  //   children:[
  //     {
  //       path:'/redirect/:path(.*)',
  //       component:()=>import('@/views/redirect/index.vue')
  //     }
  //   ]
  // },
  // {
  //   path:'/login',
  //   component:()=>import('@/views/login/index.vue')
  // },
  // {
  //   path: '/',
  //   component: Layout,
  //   redirect: '/dashboard',
  //   children: [
  //     {
  //       path: 'dashboard',
  //       component: () => import('@/views/dashboard/index.vue'),
  //       name: 'Dashboard',
  //       meta: { title: 'dashboard', icon: 'homepage', affix: true }
  //     }
  //   ]
  // }
]